home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / H-I / HyperHackers.cpt / Hyper-Hackers Queue 1.0 / card_22889.txt < prev    next >
Text File  |  1989-02-26  |  1KB  |  38 lines

  1. -- card: 22889 from stack: in.0
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3797
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 1
  9. ----- text -----
  10.  
  11. From: edmoy@violet.berkeley.edu
  12.  
  13. Date: 1 Mar 88 21:25:11 GMT
  14.  
  15. I don't know if this is only in HyperCard or a general Mac problem, but
  16. I do know that what works on the Mac 2 fails on a Mac+.
  17.  
  18. I was writing an XFCN for HyperCard, using a handle to data storage needed by
  19. the XFCN.  The XFCN was written in LightSpeed C, but I think the problem
  20. would show up in any C compiler.  In the data is an array of Pascal strings.
  21. Originally the array was declared:
  22.  
  23.     char field[NFIELDS][17];
  24.  
  25. The maximum string length is 16, plus one for the length byte.  This worked
  26. fine on my Mac 2, but crashed on my Mac+ when indexing odd numbered strings.
  27. When I changed this to:
  28.  
  29.     char field[NFIELDS][18];
  30.  
  31. it worked on the Mac+.  This seems to indicate that Pascal strings must be
  32. word aligned on a Mac+, but not necessarily on a Mac 2.
  33.  
  34.  
  35.  
  36. -- part contents for background part 45
  37. ----- text -----
  38. Word Alignment of Pascal Strings on Mac vs Mac 2